var fs = require('fs');

fs.writeFile('./write.txt', '大哥大嫂过年好', function(error) {
    if (error) {
        console.log('文件写入失败');
    } else {
        console.log('文件写入成功');
    }
});